//
//  YLHomeGoodsHeaderView.m
//  YLFinanceService
//
//  Created by she1323 on 2017/8/24.
//  Copyright © 2017年 she1323. All rights reserved.
//  首页产品的每组头部

#import "YLHomeGoodsHeaderView.h"
#import "YLGlobeHeader.h"
#import "YLHomeProductGroup.h"
@interface YLHomeGoodsHeaderView ()

@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *tagLabel;
@property (weak, nonatomic) IBOutlet UIImageView *icon;

@end

@implementation YLHomeGoodsHeaderView

- (void)awakeFromNib {
    [super awakeFromNib];
    
    _tagLabel.layer.masksToBounds = YES;
    _tagLabel.layer.cornerRadius = 8;
    _tagLabel.layer.borderWidth = 0.5;
    _tagLabel.textColor = YLLOrgColor;
    _tagLabel.layer.borderColor = YLLOrgColor.CGColor;
}

- (void)setGroup:(YLHomeProductGroup *)group
{
    _group = group;
    _icon.image = [UIImage imageNamed:group.icon];
    _titleLabel.text = group.title;
    _tagLabel.text = group.tag;
}

+ (NSString *)headerID
{
    return @"YLHomeGoodsHeaderView";
}

@end
